import serial
import time

class Serial(object):
    def __init__(self, port='/dev/ttyAMA0'):
        self.ss = serial.Serial(port)
        print "Connected."

    def comm(self, command):
        return self.ss.write(command+'\n')
    
    def move(self, command, duration):
        self.comm(command)
        time.sleep(duration)
        self.comm('s')

